home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / gnu / calc202a.lha / calc-2.02a / Makefile < prev    next >
Makefile  |  1993-06-01  |  5KB  |  186 lines

  1. # Makefile for "Calc", the GNU Emacs Calculator.
  2. #  Copyright (C) 1991, 1992, 1993 Free Software Foundation.
  3. #  Author: Dave Gillespie.
  4. #  Author's address: daveg@synaptics.com.
  5.  
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation (any version).
  9.  
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. # GNU General Public License for more details.
  14.  
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; see the file COPYING.  If not, write to
  17. # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19.  
  20. # To install Calc for private use, type `make'.
  21. # To install Calc for public use, type `make install'.
  22.  
  23. # How to read a Makefile:
  24. #   The command `make target' looks for `target:' in the Makefile.
  25. #   First, any sub-targets after the `:' are made.
  26. #   Then, the Unix commands on the following lines are executed.
  27. #   `$(SYMBOL)' expands according to the `SYMBOL =' definition below.
  28.  
  29.  
  30. # Programs.
  31. EMACS    = emacs
  32. TEX      = tex
  33. TEXINDEX = texindex
  34. MAKEINFO = makeinfo
  35. MAKE     = make
  36. ECHO     = @echo
  37. REMOVE     = -rm -f
  38. # (The leading `@' tells "make" not to echo the command itself during make;
  39. #  The leading `-' tells "make" to keep going if the command fails.)
  40.  
  41. # Other macros.
  42. EFLAGS   = -batch
  43. MAINT     = -l calc-maint.elc
  44.  
  45. # Control whether intermediate files are kept.
  46. PURGE     = -rm -f
  47. #PURGE     = echo Not deleting:
  48.  
  49.  
  50.  
  51. # Do full Calc installation.  (Note that `make' == `make all'.)
  52. # These are written this way instead of `all: compile private info'
  53. # to make the steps more explicit while the `make' is in progress.
  54. all:
  55.     $(MAKE) compile
  56.     $(MAKE) private
  57.     $(MAKE) info
  58.     $(ECHO) "Calc is now installed."
  59.  
  60. install:
  61.     $(MAKE) compile
  62.     $(MAKE) public
  63.     $(MAKE) info
  64.     $(ECHO) "Calc is now installed."
  65.  
  66.  
  67. # Compile Calc.
  68. compile: maint
  69.     $(EMACS) $(EFLAGS) $(MAINT) -f calc-compile
  70.  
  71.  
  72. # Add autoload and set-global-key commands to system default file.
  73. public: maint
  74.     $(EMACS) $(EFLAGS) $(MAINT) -f calc-public-autoloads
  75.  
  76.  
  77. # Add autoload and set-global-key commands to ~/.emacs file.
  78. private: maint
  79.     $(EMACS) $(EFLAGS) $(MAINT) -f calc-private-autoloads
  80.  
  81.  
  82. # Format the Calc manual for the Info system using makeinfo.
  83. info: calc.info
  84. calc.info: calc.texinfo
  85.     -$(MAKEINFO) calc.texinfo
  86.     $(ECHO) "Please ignore warnings for Copying, Getting Started, and Interactive Tutorial."
  87.     $(MAKE) texinfo
  88.  
  89.  
  90. # Format the Calc manual for the Info system using texinfo.el.
  91. # (Use this only if you do not have makeinfo.)
  92. texinfo: calc.info-2
  93. calc.info-2: calc.texinfo
  94.     $(EMACS) $(EFLAGS) calc.texinfo -f texinfo-format-buffer -f save-buffer
  95.  
  96.  
  97. # Format the Calc manual as one printable volume using TeX.
  98. tex:
  99.     $(REMOVE) calc.aux
  100.     $(TEX) calc.texinfo
  101.     $(TEXINDEX) calc.[cfkptv]?
  102.     $(TEX) calc.texinfo
  103.     $(PURGE) calc.cp calc.fn calc.pg calc.tp calc.vr
  104.     $(PURGE) calc.cps calc.fns calc.kys calc.pgs calc.tps calc.vrs
  105.     $(PURGE) calc.toc
  106. # Note, calc.aux and calc.ky are left behind for the benefit of "make summary".
  107.  
  108. # Format the Calc manual as two printable volumes (Tutorial and Reference).
  109. tex2: texsplit texvol1 texvol2
  110.  
  111. # Format the Calc Tutorial volume only.
  112. textut: texsplit1 texvol1
  113.  
  114. # Format the Calc Reference volume only.
  115. texref: texsplit2 texvol2
  116.  
  117. texsplit: maint
  118.     $(EMACS) $(EFLAGS) $(MAINT) calc.texinfo -f calc-split-manual
  119.  
  120. texsplit1: maint
  121.     $(EMACS) $(EFLAGS) $(MAINT) calc.texinfo -f calc-split-tutorial
  122.  
  123. texsplit2: maint
  124.     $(EMACS) $(EFLAGS) $(MAINT) calc.texinfo -f calc-split-reference
  125.  
  126. texvol1:
  127.     $(TEX) calctut.tex
  128.     $(TEXINDEX) calctut.??
  129.     $(TEX) calctut.tex
  130.     $(PURGE) calctut.tex calctut.?? calctut.??s calctut.aux calctut.toc
  131.  
  132. texvol2:
  133.     $(TEX) calcref.tex
  134.     $(TEXINDEX) calcref.??
  135.     $(TEX) calcref.tex
  136.     $(PURGE) calcref.tex calcref.?? calcref.??s calcref.aux calcref.toc
  137.  
  138.  
  139. # Format the Calc summary separately using TeX.
  140. summary: texsum
  141.     $(TEX) calcsum.tex
  142.     $(PURGE) calcsum.?? calcsum.aux calcsum.toc
  143.  
  144. texsum: maint
  145.     $(EMACS) $(EFLAGS) $(MAINT) calc.texinfo -f calc-split-summary
  146.  
  147. isummary: texisum
  148.     $(TEX) calcsum.tex
  149.     $(PURGE) calcsum.?? calcsum.aux calcsum.toc
  150.  
  151. texisum: maint
  152.     $(EMACS) $(EFLAGS) $(MAINT) calc.texinfo -f calc-inline-summary
  153.  
  154.  
  155. # All this because "-l calc-maint" doesn't work.
  156. maint: calc-maint.elc
  157. calc-maint.elc: calc-maint.el
  158.     cp calc-maint.el calc-maint.elc
  159.  
  160.  
  161. # Create an Emacs TAGS file
  162. tags: TAGS
  163. TAGS:
  164.     etags *.el
  165.  
  166.  
  167. # Delete .elc files and other reconstructible files.
  168. clean:  clean.elc clean.info clean.tex
  169.  
  170. clean.elc:
  171.     $(REMOVE) calc-*.elc
  172.     $(REMOVE) macedit.elc
  173.  
  174. clean.info:
  175.     $(REMOVE) calc.info*
  176.  
  177. clean.tex:
  178.     $(REMOVE) calc.cp calc.fn calc.ky calc.pg calc.tp calc.vr
  179.     $(REMOVE) calc.cps calc.fns calc.kys calc.pgs calc.tps calc.vrs
  180.     $(REMOVE) calc.aux calc.log calc.toc calc.dvi
  181.     $(REMOVE) calcref.*
  182.     $(REMOVE) calctut.*
  183.     $(REMOVE) calcsum.*
  184.  
  185.  
  186.